#include <cstdio>
#include <cmath>
using namespace std;

int main(){
  double w,l;
  double X;

  scanf("%lf%lf",&w,&l);
  double pi=acos(-1.0f);
  X=w/l;
  double sqX=X*X;

  double t=pow((1+2*sqX)/(2*(1+sqX)),2*sqX);
  t=t * (1+sqX)*(1+sqX)/(1+2*sqX);

  double F=1/(pi*X) * (2*X*atan(1/X) - X*sqrt(2)*atan(1/(sqrt(2)*X))
		       +0.25*log(t));
  printf("%f\n",F);
  return 0;
}

